#!/bin/bash

# cmake 编译
BUILD_DIR=build
BUILD_TYPE=Debug #Release

if [ ! -d ${BUILD_DIR} ]; then
    mkdir -p ${BUILD_DIR}
fi
cmake -B ${BUILD_DIR} -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
#cmake --build ${BUILD_DIR} --parallel 4
cmake --build ${BUILD_DIR} -j4
cp -f ${BUILD_DIR}/run ./